package com.futureweaver.config;

import com.futureweaver.resposne.vo.CustomResponseEntity;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping
public class LoginHandler {

    @RequestMapping("/login_success")
    @ResponseBody
    public CustomResponseEntity loginSuccess() {
        CustomResponseEntity result = new CustomResponseEntity();
        result.setSuccess(true);
        result.setMsg("login success");
        return result;
    }

    @RequestMapping("/login_failure")
    @ResponseBody
    public CustomResponseEntity loginFailure() {
        CustomResponseEntity result = new CustomResponseEntity();
        result.setSuccess(false);
        result.setMsg("login failure");
        return result;
    }
}
